3.23 \(\int \frac{d+e x+f x^2+g x^3+h x^4}{a+b x^2+c x^4} \, dx\)

Optimal. Leaf size=290 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{-c (2 a h+b f)+b^2 h+2 c^2 d}{\sqrt{b^2-4 a c}}-b h+c f\right )}{\sqrt{2} c^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{-2 a c h+b^2 h-b c f+2 c^2 d}{\sqrt{b^2-4 a c}}-b h+c f\right )}{\sqrt{2} c^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{(2 c e-b g) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c}+\frac{h x}{c} \]

[Out]

(h*x)/c + ((c*f - b*h + (2*c^2*d + b^2*h - c*(b*f + 2*a*h))/Sqrt[b^2 - 4*a*c])*A
rcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b
- Sqrt[b^2 - 4*a*c]]) + ((c*f - b*h - (2*c^2*d - b*c*f + b^2*h - 2*a*c*h)/Sqrt[b
^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c
^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - ((2*c*e - b*g)*ArcTanh[(b + 2*c*x^2)/Sqrt[
b^2 - 4*a*c]])/(2*c*Sqrt[b^2 - 4*a*c]) + (g*Log[a + b*x^2 + c*x^4])/(4*c)

_______________________________________________________________________________________

Rubi [A]  time = 1.51883, antiderivative size = 290, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 9, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.257 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{-c (2 a h+b f)+b^2 h+2 c^2 d}{\sqrt{b^2-4 a c}}-b h+c f\right )}{\sqrt{2} c^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{-2 a c h+b^2 h-b c f+2 c^2 d}{\sqrt{b^2-4 a c}}-b h+c f\right )}{\sqrt{2} c^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{(2 c e-b g) \tanh ^{-1}\left (\frac{b+2 c x^2}{\sqrt{b^2-4 a c}}\right )}{2 c \sqrt{b^2-4 a c}}+\frac{g \log \left (a+b x^2+c x^4\right )}{4 c}+\frac{h x}{c} \]

Antiderivative was successfully verified.

[In]  Int[(d + e*x + f*x^2 + g*x^3 + h*x^4)/(a + b*x^2 + c*x^4),x]

[Out]

(h*x)/c + ((c*f - b*h + (2*c^2*d + b^2*h - c*(b*f + 2*a*h))/Sqrt[b^2 - 4*a*c])*A
rcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c^(3/2)*Sqrt[b
- Sqrt[b^2 - 4*a*c]]) + ((c*f - b*h - (2*c^2*d - b*c*f + b^2*h - 2*a*c*h)/Sqrt[b
^2 - 4*a*c])*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[2]*c
^(3/2)*Sqrt[b + Sqrt[b^2 - 4*a*c]]) - ((2*c*e - b*g)*ArcTanh[(b + 2*c*x^2)/Sqrt[
b^2 - 4*a*c]])/(2*c*Sqrt[b^2 - 4*a*c]) + (g*Log[a + b*x^2 + c*x^4])/(4*c)

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 143.637, size = 286, normalized size = 0.99 \[ \frac{g \log{\left (a + b x^{2} + c x^{4} \right )}}{4 c} + \frac{h x}{c} + \frac{\left (b g - 2 c e\right ) \operatorname{atanh}{\left (\frac{b + 2 c x^{2}}{\sqrt{- 4 a c + b^{2}}} \right )}}{2 c \sqrt{- 4 a c + b^{2}}} - \frac{\sqrt{2} \left (b \left (b h - c f\right ) - 2 c \left (a h - c d\right ) + \sqrt{- 4 a c + b^{2}} \left (b h - c f\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b + \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{3}{2}} \sqrt{b + \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} + \frac{\sqrt{2} \left (b \left (b h - c f\right ) - 2 c \left (a h - c d\right ) - \sqrt{- 4 a c + b^{2}} \left (b h - c f\right )\right ) \operatorname{atan}{\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b - \sqrt{- 4 a c + b^{2}}}} \right )}}{2 c^{\frac{3}{2}} \sqrt{b - \sqrt{- 4 a c + b^{2}}} \sqrt{- 4 a c + b^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((h*x**4+g*x**3+f*x**2+e*x+d)/(c*x**4+b*x**2+a),x)

[Out]

g*log(a + b*x**2 + c*x**4)/(4*c) + h*x/c + (b*g - 2*c*e)*atanh((b + 2*c*x**2)/sq
rt(-4*a*c + b**2))/(2*c*sqrt(-4*a*c + b**2)) - sqrt(2)*(b*(b*h - c*f) - 2*c*(a*h
 - c*d) + sqrt(-4*a*c + b**2)*(b*h - c*f))*atan(sqrt(2)*sqrt(c)*x/sqrt(b + sqrt(
-4*a*c + b**2)))/(2*c**(3/2)*sqrt(b + sqrt(-4*a*c + b**2))*sqrt(-4*a*c + b**2))
+ sqrt(2)*(b*(b*h - c*f) - 2*c*(a*h - c*d) - sqrt(-4*a*c + b**2)*(b*h - c*f))*at
an(sqrt(2)*sqrt(c)*x/sqrt(b - sqrt(-4*a*c + b**2)))/(2*c**(3/2)*sqrt(b - sqrt(-4
*a*c + b**2))*sqrt(-4*a*c + b**2))

_______________________________________________________________________________________

Mathematica [A]  time = 1.07815, size = 383, normalized size = 1.32 \[ \frac{\frac{2 \sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (c \left (f \sqrt{b^2-4 a c}-2 a h-b f\right )+b h \left (b-\sqrt{b^2-4 a c}\right )+2 c^2 d\right )}{\sqrt{b^2-4 a c} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{2 \sqrt{2} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-c \left (f \sqrt{b^2-4 a c}+2 a h+b f\right )+b h \left (\sqrt{b^2-4 a c}+b\right )+2 c^2 d\right )}{\sqrt{b^2-4 a c} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{\sqrt{c} \left (g \left (\sqrt{b^2-4 a c}-b\right )+2 c e\right ) \log \left (\sqrt{b^2-4 a c}-b-2 c x^2\right )}{\sqrt{b^2-4 a c}}+\frac{\sqrt{c} \left (g \left (\sqrt{b^2-4 a c}+b\right )-2 c e\right ) \log \left (\sqrt{b^2-4 a c}+b+2 c x^2\right )}{\sqrt{b^2-4 a c}}+4 \sqrt{c} h x}{4 c^{3/2}} \]

Antiderivative was successfully verified.

[In]  Integrate[(d + e*x + f*x^2 + g*x^3 + h*x^4)/(a + b*x^2 + c*x^4),x]

[Out]

(4*Sqrt[c]*h*x + (2*Sqrt[2]*(2*c^2*d + b*(b - Sqrt[b^2 - 4*a*c])*h + c*(-(b*f) +
 Sqrt[b^2 - 4*a*c]*f - 2*a*h))*ArcTan[(Sqrt[2]*Sqrt[c]*x)/Sqrt[b - Sqrt[b^2 - 4*
a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b - Sqrt[b^2 - 4*a*c]]) - (2*Sqrt[2]*(2*c^2*d +
b*(b + Sqrt[b^2 - 4*a*c])*h - c*(b*f + Sqrt[b^2 - 4*a*c]*f + 2*a*h))*ArcTan[(Sqr
t[2]*Sqrt[c]*x)/Sqrt[b + Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[b + Sqrt[b
^2 - 4*a*c]]) + (Sqrt[c]*(2*c*e + (-b + Sqrt[b^2 - 4*a*c])*g)*Log[-b + Sqrt[b^2
- 4*a*c] - 2*c*x^2])/Sqrt[b^2 - 4*a*c] + (Sqrt[c]*(-2*c*e + (b + Sqrt[b^2 - 4*a*
c])*g)*Log[b + Sqrt[b^2 - 4*a*c] + 2*c*x^2])/Sqrt[b^2 - 4*a*c])/(4*c^(3/2))

_______________________________________________________________________________________

Maple [B]  time = 0.039, size = 1132, normalized size = 3.9 \[ \text{result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((h*x^4+g*x^3+f*x^2+e*x+d)/(c*x^4+b*x^2+a),x)

[Out]

h*x/c-1/4*(-4*a*c+b^2)/(4*a*c-b^2)/c*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*g-1/4*(-4*
a*c+b^2)^(1/2)/(4*a*c-b^2)/c*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)*b*g+1/2*(-4*a*c+b^
2)^(1/2)/(4*a*c-b^2)*e*ln(2*c*x^2+(-4*a*c+b^2)^(1/2)+b)+1/2*(-4*a*c+b^2)/(4*a*c-
b^2)/c*2^(1/2)/((b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctan(c*x*2^(1/2)/((b+(-4*a*c+b
^2)^(1/2))*c)^(1/2))*b*h-1/2*(-4*a*c+b^2)/(4*a*c-b^2)*2^(1/2)/((b+(-4*a*c+b^2)^(
1/2))*c)^(1/2)*arct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)^(1/2)/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a
*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*a
*h+1/2*(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)/c*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2
)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*b^2*h-1/2*(-4*a*c+b^2)^
(1/2)/(4*a*c-b^2)*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/
((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2))*b*f+c*(-4*a*c+b^2)^(1/2)/(4*a*c-b^2)*2^(1/2)/
((-b+(-4*a*c+b^2)^(1/2))*c)^(1/2)*arctanh(c*x*2^(1/2)/((-b+(-4*a*c+b^2)^(1/2))*c
)^(1/2))*d

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \frac{h x}{c} + \frac{\int \frac{c g x^{3} + c e x +{\left (c f - b h\right )} x^{2} + c d - a h}{c x^{4} + b x^{2} + a}\,{d x}}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)/(c*x^4 + b*x^2 + a),x, algorithm="maxima")

[Out]

h*x/c + integrate((c*g*x^3 + c*e*x + (c*f - b*h)*x^2 + c*d - a*h)/(c*x^4 + b*x^2
 + a), x)/c

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)/(c*x^4 + b*x^2 + a),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((h*x**4+g*x**3+f*x**2+e*x+d)/(c*x**4+b*x**2+a),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 1.69702, size = 1, normalized size = 0. \[ \mathit{Done} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((h*x^4 + g*x^3 + f*x^2 + e*x + d)/(c*x^4 + b*x^2 + a),x, algorithm="giac")

[Out]

Done